<%@include file="header.jsp"%>
<c:set var="t" value="true" />
<form action="UpdateUser" method=post>
	<br />
	<table class="table table-striped">
		<tr>
			<td><fmt:message key="label.user.userID" /></td>			
			<td><input type="text" name="userID" value="${param['userID']}" 
				 size=15 maxlength=20 readonly = "readonly"> 				
			</td>
		</tr> 
		<tr>
			<td><fmt:message key="label.user.userName" /></td>
			<td><input type="text" name="username" id = "origin"
				value="${param['username']}" size=15 maxlength=20 />
				<span class="error">${errors.origin}</span>
				</td>
		</tr>
		<tr>
			<td><fmt:message key="label.user.password" /></td>
			<td><input type="password" name="userpassword" id = "origin2"
				value="${param['userpassword']}" size=15 maxlength=30 />
				<span class="error">${errors.origin2}</span>
				</td>	
		</tr>
		<tr>
			<td><fmt:message key="label.user.role" /></td>
			<td><select name="role">
					<option value="Staff"
						${ param['role'] == "Staff" ? 'selected="selected"' : ""  }>Staff</option>
					<option value="Administrator"
						${ param['role'] == "Administrator" ? 'selected="selected"' : ""  }>Administrator</option>
					<option value="Manager"
						${ param['role'] == "Manager" ? 'selected="selected"' : ""  }>Manager</option>
			</select></td>
		</tr>

		<tr>
			<td><fmt:message key="label.user.email" /></td>
			<td><input type="text" name="email" value="${param['email']}" id = "origin3"
				size=15 maxlength=20 />
				<span class="error">${errors.origin3}</span>
				</td>
		</tr>
		<tr>
			<td><fmt:message key="label.user.phone" /></td>
			<td><input type="text" name="phone" value="${param['phone']}" id = "origin4"
				size=15 maxlength=20 />
				<span class="error">${errors.origin4}</span>
				</td>
		</tr>
		<tr>
			<td><fmt:message key="label.user.managerid" /></td>
			<td><input type="text" name="managerid" id = "origin5"
				value="${param['managerid']}" size=15 maxlength=20 />
				<span class="error">${errors.origin5}</span> </td>
		</tr>
		<tr><td colspan="2" style="text-align:center">
		<input class="btn btn-primary" type="submit" value="Submit">
		</td></tr> 
	</table>
</form>
<%@include file="footer.jsp"%>